from HTMLTestRunner import HTMLTestRunner
import unittest
from test01 import TestMethod as Test1
from test02 import TestMethod as Test2

suite = unittest.TestSuite()

# suite.addTest(Test1('test_upper'))
# suite.addTest(Test2('test_upper'))

case = unittest.defaultTestLoader.discover(start_dir='.', pattern='test*.py')

suite.addTest(case)

# runner = unittest.TextTestRunner()
# runner.run(suite)

with open('测试报告.html', 'wb') as f:
    runner = HTMLTestRunner(stream=f, title='测试报告', description='default')
    runner.run(suite)
